<?php if(get_template_type() == 'index'){?>
<!-- css by y -->
    <script src="/data/resource/js/common.js"></script>
<style>
    /*.nch-breadcrumb{display: none!important;}*/
    ._clear{
        clear: both;
    }
    ._product_info{
        background:#fff;
        /*margin-bottom: 20px;*/
    }
    ._main{
        width: 1200px;
        margin:0 auto;
    }
    ._left,._right{
        float: left;
    }
    ._left{
        width: 590px;
        padding: 10px;
    }
    ._right{
        padding: 20px;
    }
    ._img_left{
        width: 98px;
        min-height: 450px;
    }
    ._img_left,._img_zoom{
        float: left;
    }
    .zoom-desc{
        width: 80px !important;
        height: auto !important;
    }
    ._right ._goods_name{
        padding-top: 40px;
    }
    ._right ._goods_name strong{
        /*font-size: 28px;*/
        font-weight: bold;
        color:#000;
        font-size: 21px !important;
    }
    .zoom-small-image{
        width: 483px !important;
        height: 483px !important;
    }
    .cloud-zoom-gallery{display: block;margin-top: 5px;margin-bottom:5px;
        border:1px solid #fff;
        overflow: hidden;
    }
    .cloud-zoom-gallery:first-child{margin-top:0px;}
    .cloud-zoom-gallery.active{border-color: #ff8242!important;}
    .cloud-zoom-gallery img{border:none;height: 80px!important;width: 80px!important;}
    .nch-breadcrumb{
        width: 1180px !important;
        padding-left: 10px;
        padding-right: 10px;
        border-bottom:1px solid #EEE;
    }
    .nch-breadcrumb a{
        color:#000;
        font-weight: bold;
    }
    .nch-breadcrumb i{
        color:#000;
    }
    .nch-breadcrumb span{
        color:#ff7344;
    }
    .nch-breadcrumb span.arrow{
        color:#000;
    }
</style>

<!-- css -->
<!-- <script type="text/javascript" src="<?php echo RESOURCE_SITE_URL;?>/js/jquery/jquery.js"></script> -->
<script type="text/javascript" src="<?php echo RESOURCE_SITE_URL;?>/js/jquery.raty/jquery.raty.min.js"></script>
<script type="text/javascript" src="<?php echo RESOURCE_SITE_URL;?>/js/jquery.nyroModal/custom.min.js" charset="utf-8"></script>
<script src="<?php echo RESOURCE_SITE_URL;?>/js/jquery.ajaxContent.pack.js" type="text/javascript"></script>
<script src="<?php echo RESOURCE_SITE_URL;?>/js/jquery-scrolltofixed-min.js" type="text/javascript"></script>
<script type="text/javascript" src="/shop/templates/mln/js/newegg.jqzoom.js"></script>
<script type="text/javascript" language="jscript">
    $(function($) {
        var options = {
            zoomWidth: 500,
            zoomHeight: 450,
            xOffset: 20,
            yOffset: 0,
            title : false,
            showEffect:"fadein",
            hideEffect:"fadeout",
            position: "right"
        }
        $(".jqzoom").jqzoom(options);
        $('#categorymenu').scrollToFixed();
        $(".cloud-zoom-gallery").hover(function(){
            $(this).addClass('active').siblings().removeClass('active');
            $("#bigimagewrap").attr("href",$(this).attr("data-big"));
            $("#bigimage").attr("src",$(this).attr("data-big"));
        });
        $("body").scroll(function(event) {
            console.log($("#ncGoodsRate").offset().top);
            if(jQuery(window).scrollTop()>(jQuery('#ncGoodsRate').offset().top+jQuery('#ncGoodsRate').outerHeight())){
            console.log("在");
            if((jQuery(window).scrollTop()+jQuery(window).height())<jQuery('#ncGoodsRate').offset().top){
                console.log("下");
            }
        }
        });
    });
</script>
<!-- content -->
<div class="_main">
    <div class="_product_info">
        <div class="nch-breadcrumb-layout">
          <?php if(!empty($output['nav_link_list']) && is_array($output['nav_link_list'])){?>
          <div class="nch-breadcrumb wrapper"><i class="icon-home"></i>
            <?php foreach($output['nav_link_list'] as $nav_link){?>
            <?php if(!empty($nav_link['link'])){?>
            <span><a href="<?php echo $nav_link['link'];?>"><?php echo $nav_link['title'];?></a></span><span class="arrow">></span>
            <?php }else{?>
            <span><?php echo $nav_link['title'];?></span>
            <?php }?>
            <?php }?>
          </div>
          <?php }?>
        </div>
        <div class="_product">
            <div class="_left">
                <div class="_img_left">
                    <div class="zoom-desc">
                        <p>
                        <?php
                           $pics = Model('goods_images')->where(array('goods_commonid' => $output['goods']['goods_commonid']))->order('goods_image_sort asc')->select();
                           foreach($pics as $key => $val){
                        ?>
                            <a class="cloud-zoom-gallery" title="<?php echo $output['goods']['goods_name']; ?>" data-big="/data/upload/shop/store/goods/<?php echo $output['goods']['store_id'];?>/<?php echo $val['goods_image']?>"><img alt="Thumbnail 1" src="/data/upload/shop/store/goods/<?php echo $output['goods']['store_id'];?>/<?php echo $val['goods_image']?>"/></a>
                        <?php
                            }
                        ?>
                        </p>
                    </div>
                </div>
                <div class="_img_zoom">
                    <a id="bigimagewrap" class="cloud-zoom jqzoom" title="<?php echo $output['goods']['goods_name']; ?>" href="/data/upload/shop/store/goods/<?php echo $output['goods']['store_id'];?>/<?php echo $output['goods']['goods_image'];?>" target="_blank">
                        <img id="bigimage" title="<?php echo $output['goods']['goods_name']; ?>" src="/data/upload/shop/store/goods/<?php echo $output['goods']['store_id'];?>/<?php echo $output['goods']['goods_image'];?>" style="border-width:0px;width: 450px;height: 450px;" />
                    </a>

                </div>
                <div class="_clear"></div>
            </div>
            <style>
                ._right_content{
                    width: 550px;
                }
                ._right_detail{
                    height:50px;
                    line-height: 50px;
					font-size: 15px;
                    border-bottom: 1px solid #e1e1e1;
                }
                ._price{
                    color:#ff7344;
                    font-size: 24px;
                    font-weight: bold;
                }
                ._goods_price samp{
                    text-decoration: line-through;
                }
                ._market_price{
                    font-family: "Microsoft Yahei";
                    font-size: 13px;
                    color: #999;
                }
                ._tax_desc{
                    float: left;
                    width: 50%;
                    font-size: 14px;
                    color: #333;
                }
                ._pro-value{
                    color:#ff7344;
                    font-size: 14px;
                }
            </style>
            <div class="_right">
                <div class="_right_content">
                    <div class="_goods_name">
                        <strong><?php echo $output['goods']['goods_name']; ?></strong>
                    </div>
                    <div class="_right_detail _goods_jingle">
                        <span style="font-size: 15px;">
                            <?php echo $output['goods']['goods_jingle']; ?>
                        </span>
                    </div>
                    <div class="_right_detail _goods_price">
                        <span>
                            <em class="_price"><?php echo $output['goods']['goods_price']; ?></em>
                            <font color="#ff7344">元</font>
                        </span>
                        &nbsp;&nbsp;
                        <span class="_market_price">
                            (&nbsp;原价：<samp><?php echo $output['goods']['goods_marketprice']; ?></samp>&nbsp;&nbsp;&nbsp;为您节省<?php echo $output['goods']['goods_marketprice']-$output['goods']['goods_price'];?>元&nbsp;)
                        </span>
                    </div>
                    <div class="_right_detail _tax">
                        <div class="_tax_desc">
                            <?php
                                if(!$output['goods']['open_tax']){
                            ?>
                            <span><label class="pro-label">税金：</label>&nbsp;&nbsp;<span class="_pro-value">￥<?php echo $tax = cal_tax_ex($output['goods'])?></span></span>
                            <?php
                                }
                            ?>
                        </div>
                        <div class="_tax_desc">
                            <span><label class="pro-label">运费：</label>&nbsp;&nbsp;<span class="_pro-value"><?php echo ($output['goods']['goods_freight'] > 0) ? $output['goods']['goods_freight'] : '包邮';
                    ?></span></span>
                        </div>
                        <div class="_clear"></div>

                    </div>
                    <style>
                        ._evaluation .pro-label{
                            font-size: 14px;
                        }
                        .raty{
                            margin-top: -5px;
                            width: auto !important;
                            margin-right: 5px !important;
                        }
                        ._buy_num{
                            height: 50px;
                            line-height: 50px;
                        }
                        ._buy_num span{
                            font-size: 14px !important;
                        }
                        .raty i{
                            width: 14px;
                            font-size: 12px;
                            margin-left: 5px;
                        }
                        .raty i.icon-star{
                            color:#ff8242;
                        }
                        .raty i.icon-star-empty{
                            color:#ccc;
                        }

                    </style>
                    <?php
                        // $sum_geval=Model("evaluate_goods")->where(array("geval_goodsid"=>$output['goods']['goods_id']))->count();
                        // $avg_geval=ceil(Model("evaluate_goods")->where(array("geval_goodsid"=>$output['goods']['goods_id']))->avg("geval_scores"));
                    ?>
                    <div class="_right_detail _evaluation">
                        <span><label class="pro-label">
                        评价：</label>&nbsp;&nbsp;
                            <span class="raty" data-score="<?php echo $output['goods']['evaluation_good_star'];?>" title="很满意" style="width: 80px;">
                            <?php for ($i=0; $i <5 ; $i++) {
                                if($i<$output['goods']['evaluation_good_star']){
                             ?><i class="icon-star"></i>
                            <?php }else{ ?>
                                 <i class="icon-star-empty"></i>
                            <?php } }?>



                        </span>
                        </span>
                        <span><label class="pro-label">
                            <?php echo $output['goods']['evaluation_good_star'];?>分
                        </label>&nbsp;&nbsp;(<span class="pro-value" style="font-size:14px;">共<?php echo $output['goods']['evaluation_count'];?>篇评论</span>)
                        </span>
                    </div>
                    <style>
                        .increase,.decrease{
                            font: 11px/12px sans-serif, serif, Arial;
                            color: #AAA;
                            background-color: #FFF;
                            text-align: center;
                            display: block;
                            width: 16px;
                            height: 12px;
                            border: solid 1px #CCC;
                            position: absolute;
                            z-index: 1;
                        }
                        .increase{
                            left: 90px;
                            top: 10px;
                            height: 30px;
                            width: 30px;
                            line-height: 30px;
                            background-color: #fcfcfc;
                        }
                        #buyAmount{
                            position: absolute;
                            left: 31px;
                            top: 10px;
                            text-align: center;
                            height: 22px;
                            width:50px;
                        }
                        .decrease{
                            left: 0;
                            top: 10px;
                            width: 30px;
                            height: 30px;
                            line-height: 30px;
                            background-color: #fcfcfc;
                        }
                        ._change_num{
                            position: relative;
                        }
                        .dib{
                            display: inline-block;
                            line-height: 50px;
                            height: 50px;
                            vertical-align: middle;
                        }
                        .dib.kucun{
                            margin-left: 129px;
                            color: #888;
                        }
                    </style>
                    <script type="text/javascript">
                        $(function(){
                            function getkucun(){
                                return parseInt($("#kucun").html());
                            }
                            $(".increase").click(function(){
                                var kucun=getkucun();
                                var shuliang=parseInt($("#buyAmount").val());
                                if(shuliang<kucun){
                                    shuliang=shuliang+1;
                                    $("#buyAmount").val(shuliang);
                                }
                            });
                            $(".decrease").click(function(){
                                var shuliang=parseInt($("#buyAmount").val());
                                shuliang=shuliang-1;
                                if(shuliang>0){
                                    $("#buyAmount").val(shuliang);
                                }
                            });
                        });
                    </script>
                    <div class="_buy_num">
                        <div style="margin-top:20px;">
                            <span class=dib>数量：</span>
                            <span class="_change_num dib">
                            <a href="javascript:void(0)" class="decrease" nctype="decrease">-</a>
                            <input type="text" name="" id="buyAmount" value="1" size="3" maxlength="6" class="input-text">
                            <a href="javascript:void(0)" class="increase" nctype="increase">+</a>
                            </span>
                            <span class="dib kucun">库存：<span id="kucun"><?php echo $output['goods']['goods_storage'];?></span>件</span>
                        </div>
                    </div>
                    <style>
                        .addcart,.favorite{
                            font:14px  "Microsoft Yahei";
                            /*bold 16px/32px*/
                            color: #FFF;
                            text-align: center;
                            display: inline-block;
                            /*height: 32px;*/
                            /*padding: 5px 12px;*/
                            /*margin-right: 5px;*/
                            /*position: relative;*/
                            overflow: hidden;

                        }
                        .addcart i{margin-right: 5px;}
                        .addcart{
                            width: 180px;
                            height: 42px;
                            line-height: 42px;
                            background-color: #ff8242;
                            border:1px solid #ff5500;
                        }
                        .addcart:hover{
                            color:#fff;
                            background-color: #ff5500;
                            text-decoration: none;
                        }
                        .favorite{
                            background-image: url(/shop/templates/mln/images/bg_fav_btn.gif);
                            background-repeat: repeat-x;
                            border: 1px solid #e0e0e0;
                            color:#666;
                            width: 140px;
                            height: 42px;
                            line-height: 42px;
                            margin-left: 10px;
                        }
                        .favorite:hover{
                            color:#666;
                            text-decoration: none;
                        }
                        ._addcart{
                            height: 80px;
                            line-height: 80px;
                            margin-top: 30px;
                        }
                    </style>
                    <div class="_right_detail _addcart">
                        <a style="margin-right: 10px;padding-left: 30px;padding-right: 30px;width: auto;" href="javascript:void(0);" nctype="buynow_submit" class="addcart" >立即购买</a>
                        <a href="javascript:void(0);" nctype="addcart_submit" class="favorite" title="添加购物袋"><i class="icon-plus-sign"></i>添加购物袋</a>
                        <a href="javascript:collect_goods('<?php echo $output['goods']['goods_id'];?>','count','goods_collect');" class="favorite"><i></i>收藏<span>(<em nctype="goods_collect"><?php echo $output['goods']['goods_collect'];?></em>)</span></a>
                    </div>
                    <style>
                        ._like{
                            height: 20px;
                            line-height: 20px;
                            padding: 10px;
                        }
                        ._like_desc{
                            float: left;
                            width: 49%;
                            height: 20px;
                            line-height: 20px;
                            text-align: center;
                            font-size: 14px;
                        }
                        ._like_left{
                            border-right:1px solid #ccc;
                        }
                        ._share{
                            font-size: 14px;
                            height: 40px;
                            line-height: 40px;
                            border-bottom: 0;
                        }
                        .bdsharebuttonbox{
                            float: right;
                            margin-top: 8px;
                        }
                        ._right_detail._share i{margin-right:5px;}
                        ._right_detail._share a{color: #666;}
                        ._right_detail._share a:hover{text-decoration: none;}
                        ._like_desc a:hover{text-decoration: none;}
                    </style>
                    <div class="_right_detail _like">
                        <div class="_like_desc _like_left">
                            <a href="#ncGoodsRate">
                            <i class="icon-comment-alt"></i>
                            评价&nbsp;<?php if($output['goods']['evaluation_count']>10000){echo ceil($output['goods']['evaluation_count']/10000)."&nbsp;万";}else{echo $output['goods']['evaluation_count'];}?>
                            </a>
                        </div>
                        <div class="_like_desc _like_right">
                            <a href="javascript:collect_goods('327','count','goods_collect');">
                            <i class="icon-heart-empty"></i>
                            喜欢&nbsp;&nbsp;<em nctype="goods_collect"><?php echo $output['goods']['goods_collect'];?></em>
                            </a>

                        </div>
                        <div class="_clear"></div>
                    </div>
                    <div class="_right_detail _share">
                        <a href="/shop/index.php?act=search&op=index&cate_id=<?php echo $output['goods']['gc_id'];?>"><i class="icon-list-alt"></i>查看更多</a>
                        <div class="bdsharebuttonbox"><a href="#" class="bds_more" data-cmd="more"></a><a href="#" class="bds_qzone" data-cmd="qzone" title="分享到QQ空间"></a><a href="#" class="bds_tsina" data-cmd="tsina" title="分享到新浪微博"></a><a href="#" class="bds_tqq" data-cmd="tqq" title="分享到腾讯微博"></a><a href="#" class="bds_renren" data-cmd="renren" title="分享到人人网"></a><a href="#" class="bds_weixin" data-cmd="weixin" title="分享到微信"></a></div>
<script>window._bd_share_config={"common":{"bdSnsKey":{},"bdText":"","bdMini":"2","bdMiniList":false,"bdPic":"","bdStyle":"0","bdSize":"16"},"share":{}};with(document)0[(getElementsByTagName('head')[0]||body).appendChild(createElement('script')).src='http://bdimg.share.baidu.com/static/api/js/share.js?v=89860593.js?cdnversion='+~(-new Date()/36e5)];</script>
                    </div>
                </div>
            </div>
            <div class="_clear"></div>
        </div>
    </div>
    <style>
    ._guess_like{
        background:#fff;
        padding:0 0px;
        margin-top: 10px;
    }
    ._guess_like ._title{
        height: 34px;
        line-height: 34px;
        padding-top: 20px;
        text-align: center;
    }
    ._guess_like ._title h3{
        font-size: 20px;
        color:#000;
    }
    .myslider{
        height: 224px;
    }
    ._guess_like ul{
        border-top: 1px solid #ccc;
        display: block;
        overflow: hidden;
        width: 1080px;
        margin: 0 auto;
        position: absolute;
    }
    ._guess_like li{
        width: 216px;
        float: left;
    }
    ._g_list{
        padding:10px 0px;
        text-align: center;
        width:20%;
        float: left;
    }
    ._g_img{
        text-align: center;
    }
    ._g_list div{
        text-align: center;
    }
    ._g_name,._g_price{
        height: 32px;
        line-height: 32px;
    }
    ._g_price em{
        color:#ff8242;
    }
    ._detail{
        /*padding:0 30px;*/
        background:#fff;
    }
    .ncs-goods-title-nav{
        margin-top: 10px;
    }
    .ncs-goods-title-nav ul li.current{
        margin: 0;
    }
    .ncs-goods-title-nav ul li.current a,.ncs-goods-title-nav ul li a{
        padding:14px 50px 14px 50px;
    }
    .ncs-goods-title-nav ul,.nc-goods-sort{
        border:0;
    }
    .ncs-goods-title-nav ul li.current a{
        border-left:0;
        border-color: #f90 #E0E0E0 transparent #E0E0E0;
    }
    ._guess_like{position: relative;}
    ._guess_like .unslider-arrow{
        cursor: pointer;
        height: 130px;
        position: absolute;
        z-index: 5;
        width: 50px;
        top: 85px;
        background-color: #ccc;
        font-size: 28px;
        text-align: center;
        line-height: 130px;
        font-size: 0px;
    }
    ._guess_like .unslider-arrow.prev{
        left: 0px;
        background-image: url(/shop/templates/mln/images/bg_slider_left.gif);
    }

    ._guess_like .unslider-arrow.next{
        right: 0px;
        background-image: url(/shop/templates/mln/images/bg_slider_right.gif);
    }
    .nc-goods-sort li span{
        font-weight: 700;
        color: #000;
    }
    </style>
    <div class="_guess_like">
    <div class="_title">
        <h3>你可能会喜欢</h3>
    </div>
    <div class="myslider">
        <ul>
        <?php for ($i=0; $i <3 ; $i++) { ?>
            <li>
            <?php
                if($i==0){
                    $limit=5;
                }else{
                    $temp=($i*5)-1;
                    $limit=$temp.","."5";
                }
                $goods_list = Model()->table('goods')->where(array("goods_verify"=>1,'goods_state' => 1))->limit($limit)->select();
                foreach ($goods_list as $key => $value) {
                ?>

              <div class="_g_list">
                  <div class="_g_img">
                    <a href="/shop/index.php?act=goods&op=index&goods_id=<?php echo $value['goods_id'];?>" target="_blank">
                        <img src="<?php echo thumb($value,120,1);?>" alt="" width="120" height="120">
                    </a>
                  </div>
                  <div class="_g_name">
                      <span>
                        <a href="/shop/index.php?act=goods&op=index&goods_id=<?php echo $value['goods_id'];?>" target="_blank">
                          <?php echo mb_substr($value['goods_name'],0,30);?>
                        </a>
                      </span>
                  </div>
                  <div class="_g_price">
                      <em>
                          ￥<?php echo $value['goods_price'];?>
                      </em>
                  </div>
              </div>
            <?php }?>
            </li>
        <?php } ?>
        </ul>
    </div>
    </div>
    <!-- <script src="/shop/templates/haidao/js/jquery.js"></script> -->
    <script src="/shop/templates/haidao/js/unslider/js/unslider-min.js"></script> <!-- but with the right path! -->
    <script>
        $(function () {
            $('.myslider').unslider({autoplay: true, arrows: true});
            $(".unslider").hover(function(){
                $(".unslider-arrow").toggle();
            });
            // $(".myslider").mouseleave(function(){
            //     $(".unslider-arrow").hide();
            // });

        });
    </script>
     <div class="_clear"></div>
    <style type="text/css">
        .unslider-nav{display: none;}
        .unslider{height: 224px;}
        #categorymenu{background-color: #F6F6F6;}
        #categorymenu li a{position: relative;}
        #categorymenu li a span{
            position: absolute;
            display: block;
            height: 14px;
            width:1px;
            background-color: #e0e0e0;
            top: 50%;
            margin-top:-7px;
            right: 0px;
        }
        /*.ncs-goods-title-nav ul li:first-child a{margin-left: 0px!important;border-left:0px;}*/
        #categorymenu li.current a span{display: none;}
        .ncs-goods-title-nav ul li a {border-width:0px;}
        .ncs-goods-title-nav ul li.current a {border-width:2px 1px 0 1px;/*margin-left:-1px;*//*border-left:1px solid #e0e0e0;*/}
    </style>

    <div class="_detail">
        <div class="ncs-goods-main" id="main-nav-holder">
      <div class="tabbar pngFix" id="main-nav">
        <div class="ncs-goods-title-nav">
          <ul id="categorymenu">
            <li class="current">
                <a id="tabGoodsIntro" href="#ncGoodsIntro">
                    商品参数
                    <span></span>
                </a>
            </li>
            <li>
                <a id="tabGoodsDetails" href="#ncGoodsDetails">
                    商品详情<em>(<?php echo $output['goods_evaluate_info']['all'];?>)</em>
                    <span></span>
                </a>

            </li>
            <li><a id="tabGoodsTraded" href="#ncGoodsTraded">
                销售记录<em>(<?php echo $output['goods']['goods_salenum']; ?>)</em><span></span></a></li>
            <!-- <li><a id="tabGoodsPics" href="#ncGoodsPics">商品实拍<span></span></a></li> -->
            <li><a id="tabGoodsRate" href="#ncGoodsRate">用户评价<span></span></a></li>
          </ul>
<!--          <div class="switch-bar"><a href="javascript:void(0)" id="fold">&nbsp;</a></div>-->
        </div>
      </div>
      <style>
        #categorymenu{background-color: #F6F6F6;}
        ._argument{
            height: 60px;
            margin-top: 20px;
            margin-bottom: 20px;
            padding-left: 60px;
            padding-right: 60px;
        }
        ._line{
            height: 40px;
            border-bottom:1px solid #e0e0e0;
        }
        ._arg{
            width: 300px;
            height: 50px;
            margin: 0 auto;
            margin-top: -25px;
            background:#999999;
            color:#fff;
            font-size: 16px;
            font-weight: bold;
            line-height: 50px;
            text-align: center;
        }
        #ncGoodsDetails{overflow: hidden;
            padding-left: 20px;
            padding-right: 20px;
        }
        #ncGoodsDetails img{max-width: 1160px}
      </style>
      <div class="ncs-intro">
        <div class="content bd" id="ncGoodsIntro">
            <div class="_argument">
                <div class="_line">

                </div>
                <div class="_arg">
                    商品参数
                </div>
            </div>
          <!--S 满就送 -->
          <?php if($output['mansong_info']) { ?>
          <div class="nc-mansong">
            <div class="nc-mansong-ico"></div>
            <dl class="nc-mansong-content">
              <dt><?php echo $output['mansong_info']['mansong_name'];?>
                <time>( <?php echo $lang['nc_promotion_time'];?><?php echo $lang['nc_colon'];?><?php echo date('Y-m-d',$output['mansong_info']['start_time']).'--'.date('Y-m-d',$output['mansong_info']['end_time']);?> )</time>
              </dt>
              <dd>
                <?php foreach($output['mansong_info']['rules'] as $rule) { ?>
                <span><?php echo $lang['nc_man'];?><em><?php echo ncPriceFormat($rule['price']);?></em><?php echo $lang['nc_yuan'];?>
                <?php if(!empty($rule['discount'])) { ?>
                ， <?php echo $lang['nc_reduce'];?><i><?php echo ncPriceFormat($rule['discount']);?></i><?php echo $lang['nc_yuan'];?>
                <?php } ?>
                <?php if(!empty($rule['goods_id'])) { ?>
                ， <?php echo $lang['nc_gift'];?> <a href="<?php echo $rule['goods_url'];?>" title="<?php echo $rule['mansong_goods_name'];?>" target="_blank"> <img src="<?php echo cthumb($rule['goods_image'], 60);?>" alt="<?php echo $rule['mansong_goods_name'];?>"> </a>&nbsp;。
                <?php } ?>
                </span>
                <?php } ?>
              </dd>
              <dd class="nc-mansong-remark"><?php echo $output['mansong_info']['remark'];?></dd>
            </dl>
          </div>
          <?php } ?>
          <!--E 满就送 -->
          <?php if(is_array($output['goods']['goods_attr']) || isset($output['goods']['brand_name'])){?>
          <style type="text/css">
            .nc-goods-sort{overflow: hidden;}
            .nc-goods-sort li label,.nc-goods-sort li span{float: left;}
            .nc-goods-sort li label{text-align: right;width:30%;}
            .nc-goods-sort li span{text-align: left;width:70%;}
          </style>
          <ul class="nc-goods-sort">
          <?php
            if(!empty($output['goods']['goods_serial'])){
          ?>
            <li><label>商家货号：</label><span><?php echo $output['goods']['goods_serial'];?></span></li>
            <?php }?>
            <?php if(!empty($output['goods']['brand_name'])){echo '<li><label>'.$lang['goods_index_brand'].$lang['nc_colon'].'</label><span>'.$output['goods']['brand_name'].'</span></li>';}?>
            <?php if(is_array($output['goods']['goods_attr']) && !empty($output['goods']['goods_attr'])){?>
            <?php foreach ($output['goods']['goods_attr'] as $val){ $val= array_values($val);
//            if(empty(trim($val[1]))){
//            continue;
//            }
                if($val[1] == '不限'){
                    continue;
                }
            echo '<li><label>'.$val[0].$lang['nc_colon'].'</label><span>'.$val[1].'</span></li>'; }?>
            <?php }?>
          </ul>
          <?php }?>
          <div class="ncs-goods-info-content">
            <?php if (isset($output['plate_top'])) {?>
            <div class="top-template"><?php echo $output['plate_top']['plate_content']?></div>
            <?php }?>
            <div class="default"></div>
            <?php if (isset($output['plate_bottom'])) {?>
            <div class="bottom-template"><?php echo $output['plate_bottom']['plate_content']?></div>
            <?php }?>
          </div>
        </div>
      </div>
      <div class="ncs-intro">
        <div class="content bd" id="ncGoodsDetails">
            <div class="_argument">
                <div class="_line">
                </div>
                <div class="_arg">
                    商品详情
                </div>
            </div>
            <div>
                <?php echo $output['goods']['goods_body']; ?>
            </div>

        </div>
      </div>
      <div class="ncs-intro">
        <div class="content bd" id="ncGoodsTraded">
            <div class="_argument">
                <div class="_line">
                </div>
                <div class="_arg">
                    销售记录
                </div>
            </div>
            <div id="salelog_demo">

            </div>

        </div>
      </div>
      <script type="text/javascript">
          $("#salelog_demo").load('index.php?act=goods&op=salelog&goods_id=<?php echo $output['goods']['goods_id'];?>&store_id=<?php echo $output['goods']['store_id'];?>&vr=<?php echo $output['goods']['is_virtual'];?>', function(){
              });

      </script>
      <style type="text/css">
        #salelog_demo{padding-left: 60px;padding-left: 60px;}
        #salelog_demo table{
            width: 1080px!important;
        }
        #ncGoodsPics .gPicsbody{
            text-align: center;
            padding-bottom: 40px;
        }
        #ncGoodsPics .gPicsbody a{
            margin-top: 40px;
            display: block;
            width: 1200px;
            clear: both;
            text-align: center;
            margin:10 auto 0 auto;
            overflow: hidden;
        }
        #ncGoodsPics .gPicsbody a img{
            max-width:1200px;
        }
        .unslider-arrow{display: none;}
      </style>
   <!--    <div class="ncs-intro">
        <div class="content bd" id="ncGoodsPics">
            <div class="_argument">
                <div class="_line">
                </div>
                <div class="_arg">
                    商品实拍
                </div>
            </div>
            <div class="gPicsbody">
                <?php if($pics){ ?>
                    <?php foreach ($pics as $key => $p) { ?>
                       <a href="/data/upload/shop/store/goods/<?php echo $output['goods']['store_id'];?>/<?php echo $p['goods_image']?>" target="_blank">
                            <img src="/data/upload/shop/store/goods/<?php echo $output['goods']['store_id'];?>/<?php echo $p['goods_image']?>">
                       </a>
                    <? } ?>
                <?php } ?>
            </div>

        </div>
      </div> -->
      <style type="text/css">
        /*._arg.bgorange{background-color: #ff6801;}*/
        .gEvobody{
            padding: 20px 60px 20px 60px;
        }
        .gEvobody .loginarea{
            border:1px solid #ddd6c4;
            background-color:#fff8e8;
            padding:18px 50px 18px 18px;
            overflow: hidden;
        }
        .gEvobody .loginarea a{
            color: #6c3610;
        }
        .gEvobody .loginarea div{
            height: 40px;
            line-height: 40px;
            float: left;
            color: #6c3610;
        }
        .gEvobody .loginarea .left{
            width: 745px;
        }
        .gEvobody .loginarea .center{
            width: 110px;
        }
        .gEvobody .loginarea .right{

        }
        .gEvobody .loginarea .right a:hover{
            text-decoration: none;
        }
        .gEvobody .loginarea .right a{
            color: #FFF;
            display: block;
            background-color: #ff6801;
            width:150px;
            text-align: center;
        }
      </style>
      <div class="ncs-comment">
        <div class="content bd" id="ncGoodsRate">
            <div class="_argument">
                <div class="_line">
                </div>
                <div class="_arg bgorange">
                    用户评价
                </div>
            </div>
            <div class="gEvobody">
                <?php if(!$_SESSION['member_id']){?>
                    <div class="loginarea">
                        <div class="left">
                            亲爱的你，被默默地看了，快登录帮我评价一下吧。
                        </div>
                        <div class="center">
                            <a href="/shop/?act=login&op=register">
                                立即注册
                            </a>
                        </div>
                        <div class="right">
                            <a href="/shop/?act=login">
                                登录
                            </a>
                        </div>
                    </div>
                <?php }else{ ?>

                <?php } ?>
            </div>

        </div>
      </div>
      <style type="text/css">
        .comment_body{width: 1200px;margin-top: 10px;overflow: hidden;}
        .comment_body .comment_solid{
            margin:30px 25px;
            width:1148px;
            border-radius: 1px;
            border: 1px solid rgba(222,222,222,0.5);
            overflow: hidden;
        }
        .comment_body .comment_wrap{
            width:1106px;

            overflow: hidden;
        }
        .comment_wrap .facewrap{width: 80px;float: left;}
        .comment_wrap .facewrap img{width: 80px;height: 80px;display: block;}
        .comment_wrap .bodywrap{float: left;margin-left: 30px;}
        .comment_wrap .bodywrap .commentcontent{
            color: #6c3614;font-size: 15px;
        }
        .comment_wrap .bodywrap .raty{
            width:95px ;
        }
      </style>
      <div class="comment_body">
<!--        --><?php
//            $model=Model();
//            $gid=intval($_REQUEST['goods_id']);
//            $on = 'evaluate_goods.geval_frommemberid=member.member_id';
//            $glist=$model->table('member,evaluate_goods')->join('inner')->on($on)->where(array('evaluate_goods.geval_goodsid'=>$gid))->order("evaluate_goods.geval_addtime DESC")->group("evaluate_goods.geval_id")->select();
//            // print_r($glist);exit;
//            if($glist){
//                foreach ($glist as $key => $gev) {
//        ?>
<!--        <div class="comment_solid">-->
<!--            <div class="comment_wrap">-->
<!--                <div class="facewrap">-->
<!--                    <img src="--><?php //echo $gev['member_avatar'];?><!--">-->
<!--                </div>-->
<!--                <div class="bodywrap">-->
<!--                    <p class="commentcontent">-->
<!--                        --><?php //echo $gev['geval_content'];?>
<!--                    </p>-->
<!--                    <div class="raty" data-score="--><?php //echo $gev['geval_scores'];?><!--">-->
<!--                    </div>-->
<!--                </div>-->
<!--            </div>-->
<!--        </div>-->
<!--        --><?php
//                }
//            }
//        ?>



      </div>


        <div style="border-top: 1px solid #ddd;text-align: center;">
            <div class="_right_detail _addcart">
                <a style="margin-right: 10px;padding-left: 30px;padding-right: 30px;width: auto;" href="javascript:void(0);" nctype="buynow_submit" class="addcart">立即购买</a>
                <a href="javascript:void(0);" nctype="addcart_submit" class="favorite" title="添加购物袋"><i class="icon-plus-sign"></i>添加购物袋</a>
                <a href="javascript:collect_goods('328','count','goods_collect');" class="favorite"><i></i>收藏<span>(<em nctype="goods_collect">0</em>)</span></a>
            </div>
        </div>
<style>
.user-avatar img{
width: 80px;
height: 80px;
max-width: 80px !important;
max-height: 80px !important;
border-radius : 0 !important;
}
.ncs-commend-floor .user-avatar a{
border-radius: 0 !important;
}
.ncs-commend-floor .user-avatar{
position: relative;
left: 0;
top: 0;
float: left;
width: auto !important;
height: auto !important;

}
.ncs-commend-floor .detail{
float: left;
}
.ncs-commend-floor{
overflow: hidden;
border: 1px solid #dedede;
            border-radius: 5px;
            padding: 20px;
            margin-bottom: 10px;
}
.ncs-commend-floor .detail dt {
display: none;
}
.ncs-commend-floor .detail .photos-thumb a img{
width: 200px !important;
height: 200px !important;
max-width: 200px !important;
max-height: 200px !important;
}
.ncs-commend-floor .detail dd span{
            color: #6c3614;font-size: 15px;

}
.ncs-commend-floor .detail .photos-thumb li{
width: auto;
}
</style>
<script >
    $.get('/shop/?act=goods&op=comments_list&goods_id=<?php echo $_GET['goods_id']?>',function(xml){
        // console.log(xml);
        $('.comment_body').html($(xml).find('.ncs-commend-main').html())
    });
</script>

      <!-- <div class="ncs-goods-title-nav">
            <ul id="comment_tab">
              <li data-type="all" class="current"><a href="javascript:void(0);"><?php echo $lang['goods_index_evaluation'];?>(<?php echo $output['goods_evaluate_info']['all'];?>)</a></li>
              <li data-type="1"><a href="javascript:void(0);">好评(<?php echo $output['goods_evaluate_info']['good'];?>)</a></li>
              <li data-type="2"><a href="javascript:void(0);">中评(<?php echo $output['goods_evaluate_info']['normal'];?>)</a></li>
              <li data-type="3"><a href="javascript:void(0);">差评(<?php echo $output['goods_evaluate_info']['bad'];?>)</a></li>
            </ul>
       </div> -->


<!--       <div class="ncs-comment">
        <div class="ncs-goods-title-bar hd">
          <h4><a href="javascript:void(0);">用户评价</a></h4>
        </div>
        <div class="ncs-goods-info-content bd">
          <div class="top">
            <div class="rate">
              <p><strong><?php echo $output['goods_evaluate_info']['good_percent'];?></strong><sub>%</sub>好评</p>
              <span>共有<?php echo $output['goods_evaluate_info']['all'];?>人参与评分</span></div>
            <div class="percent">
              <dl>
                <dt>好评<em>(<?php echo $output['goods_evaluate_info']['good_percent'];?>%)</em></dt>
                <dd><i style="width: <?php echo $output['goods_evaluate_info']['good_percent'];?>%"></i></dd>
              </dl>
              <dl>
                <dt>中评<em>(<?php echo $output['goods_evaluate_info']['normal_percent'];?>%)</em></dt>
                <dd><i style="width: <?php echo $output['goods_evaluate_info']['normal_percent'];?>%"></i></dd>
              </dl>
              <dl>
                <dt>差评<em>(<?php echo $output['goods_evaluate_info']['bad_percent'];?>%)</em></dt>
                <dd><i style="width: <?php echo $output['goods_evaluate_info']['bad_percent'];?>%"></i></dd>
              </dl>
            </div>
            <div class="btns"><span>您可对已购商品进行评价</span>
              <p><a href="<?php if ($output['goods']['is_virtual']) { echo urlShop('member_vr_order', 'index');} else { echo urlShop('member_order', 'index');}?>" class="ncs-btn ncs-btn-red" target="_blank"><i class="icon-comment-alt"></i>评价商品</a></p>
            </div>
          </div>
          <div class="ncs-goods-title-nav">
            <ul id="comment_tab">
              <li data-type="all" class="current"><a href="javascript:void(0);"><?php echo $lang['goods_index_evaluation'];?>(<?php echo $output['goods_evaluate_info']['all'];?>)</a></li>
              <li data-type="1"><a href="javascript:void(0);">好评(<?php echo $output['goods_evaluate_info']['good'];?>)</a></li>
              <li data-type="2"><a href="javascript:void(0);">中评(<?php echo $output['goods_evaluate_info']['normal'];?>)</a></li>
              <li data-type="3"><a href="javascript:void(0);">差评(<?php echo $output['goods_evaluate_info']['bad'];?>)</a></li>
            </ul>
          </div>
          <!-- 商品评价内容部分 -->
          <!-- <div id="goodseval" class="ncs-commend-main"></div> -->
        <!-- </div> -->
      <!-- </div> -->
      <!-- <div class="ncg-salelog">
        <div class="ncs-goods-title-bar hd">
          <h4><a href="javascript:void(0);"><?php echo $lang['goods_index_sold_record'];?></a></h4>
        </div>
        <div class="ncs-goods-info-content bd" id="ncGoodsTraded">
          <div class="top">
            <div class="price"><?php echo $lang['goods_index_goods_price'];?><strong><?php echo $output['goods']['goods_price'];?></strong><?php echo $lang['goods_index_yuan'];?><span><?php echo $lang['goods_index_price_note'];?></span></div>
          </div>
          <!-- 成交记录内容部分 -->
          <!-- <div id="salelog_demo" class="ncs-loading"> </div> -->
        <!-- </div> -->
      <!-- </div> -->


    </div>
    </div>
</div>
<!-- content -->


<?php if(false){?>
    <div class="pd-wrap fix">
        <div class="product_intro">
            <div class="product-name" id="bfdProductTitle">
            <?php echo $output['goods']['goods_name']; ?></div>
            <div class="product-wrap fix">
                <div class="product_preview">

<style type="text/css">
.zoom-section{clear:both; }
*html .zoom-section{display:inline;clear:both;}
.zoom-desc{width:383px; padding:12px 0px; height:60px; overflow:hidden;}
.zoom-desc p{ width:450px;  overflow:hidden; }
.zoom-desc a{ float:left; width:47px; height:47px;border-radius:2px;  display:block; border:1px solid #dad8d9; margin-right:10px; background:#fff;overflow:hidden;}
.zoom-desc a img{max-width:100%;}
.zoom-desc a.hover{border:2px solid #598ee4;}
.zoom-small-image{float:left;position:relative;  width:383px; height:383px; /*border:1px solid #d9d9d9;*/ background:#fff;  }
.zoom-small-image a{ height:383px; }
.zoom-tiny-image{margin:0px;}
.zoom-tiny-image:hover{border:1px solid #cc000;}
.zoom-small-image table{table-layout:fixed;}
#ProductDetails_common_ProductImages___imgBig{max-width:383px !important;}
.my_left_category{
    display: none !important;
}
/*.nch-breadcrumb-layout{
    display: none !important;
}*/
/*._jmyp .product-des .num-wrap .num-bar > *{
    width: 23px !important;
}*/
.Product_input{
    padding: 0 !important;
}
._jmyp #addcartButton:hover{
    text-decoration: none;
}
._jmyp .pd-wrap{
    width: 1200px;
    margin:0 auto;
}
._jmyp .tde-wrap{
    width: 1200px;
    margin:0 auto;
}
</style>
<table cellpadding="0" cellspacing="0" border="0">
    <tr class="product_preview3">
        <td>
            <div class="zoom-section">
                <div class="zoom-section">
                    <div class="zoom-small-image">
                        <a id="zoom1" class="cloud-zoom" rel="adjustX:10, adjustY:-4" title="<?php echo $output['goods']['goods_name']; ?>" href="/Storage/master/product/images/508c1f68fbb2427583bbc55abb194c54.jpg">
                            <table cellspacing="0" cellpadding="0" border="0" width="100%" height="100%">
                                <tr>
                                    <td align="center" valign="middle">
                                        <img id="ProductDetails_common_ProductImages___imgBig" title="Optional title display" src="/data/upload/shop/store/goods/<?php echo $output['goods']['store_id'];?>/<?php echo $output['goods']['goods_image'];?>" style="border-width:0px;" />
                                    </td>
                                </tr>
                            </table>
                        </a>
                    </div>
                    <div class="zoom-desc">
                        <p>
                        <?php
                           $pics = Model('goods_images')->where(array('goods_commonid' => $cmid))->order('goods_image_sort asc')->select();
                           foreach($pics as $key => $val){
                        ?>
                            <a id="ProductDetails_common_ProductImages___iptPicUrl1" class="cloud-zoom-gallery" title="<?php echo $output['goods']['goods_name']; ?>" rel="useZoom: 'zoom1', smallImage: '/data/upload/shop/store/goods/<?php echo $output['goods']['store_id'];?>/<?php echo $val['goods_image']?>'" href="/data/upload/shop/store/goods/<?php echo $output['goods']['store_id'];?>/<?php echo $val['goods_image']?>"><img id="ProductDetails_common_ProductImages___imgSmall1" alt="Thumbnail 1" src="/data/upload/shop/store/goods/<?php echo $output['goods']['store_id'];?>/<?php echo $val['goods_image']?>" style="border-width:0px;" /></a>
                        <?php
                            }
                        ?>
                        </p>
                    </div>
                    </div>

                </div>
        </td>
    </tr>
    <tr>
        <td height="10">
        </td>
    </tr>

</table>



                    <div class="fix">

                        <div class="addfav-wrap"><a id="addFavorite" href="javascript:collect_goods('<?php echo $output['goods']['goods_id']; ?>','count','goods_collect');" class="addfav-btn">收藏该商品</a></div>
                    </div>

                </div>
                <div class="product_parameter">
                    <div class="product-des des1">
                        <dl class="des-item fix">
                            <dt>单品价格</dt>
                            <dd>
                                <span class="pro-pram single-price">￥<span id="ProductDetails_lblBuyPrice"><?php
                                    echo $output['goods']['goods_price'];
                                ?></span></span>
                                <?php
                                    if(!$output['goods']['open_tax']){
                                ?>
                                <span><label class="pro-label">税金</label><span class="pro-value">￥<?php echo $tax = cal_tax_ex($output['goods'])?></span></span>
                                <?php
                                    }
                                    else{

                                    }
                                ?>
                                <!-- <span><label class="pro-label">进口税</label><span class="pro-value"><span>10</span>%</span></span>
                                <span class="rate-tip">关税低于50元（含50），免征</span> -->
                            </dd>
                        </dl>
                        <dl class="des-item fix">
                            <dt>总金额</dt>
                            <dd>
                                <span class="pro-pram total-price">￥<strong><span id="productDetails_Total"><?php
                                    echo number_format($output['goods']['goods_price'] + $tax,2);
                                ?></span> </strong></span>
<!--                                <div class="view-rate">-->
<!--                                    <span style="cursor:pointer;">查看关税表</span>-->
<!--                                    <div class="rate-wrap">-->
<!--                                        <div class="rate-con">-->
<!--                                            <p>个人邮寄进境物品， 海关依法征收进口税，应征进口税税额在人民币50元（含50元）以下的海关予以免征，包裹货值每次限值1000元，税率为：奶粉10%，洗护50%，服装20%，食品10%，具体税率请查看<a class="link" href="helpItem.aspx?helpid=64" target="_blank">详情>></a></p>-->
<!--                                        </div>-->
<!--                                    </div>-->
<!--                                </div>-->
                            </dd>
                        </dl>
                    </div>
                    <div class="product-des des2">
                        <dl class="des-item fix">
                            <dt>累计成交</dt>
                            <dd><span class="mr20"><em><?php echo $output['goods']['goods_salenum'];?></em>件成交</span><span><em><?php echo $output['goods']['evaluation_count'];?></em>条评价</span></dd>
                        </dl>
                        <dl class="des-item fix">
                            <dt>支付方式</dt>
                            <dd><span class="mr25">在线支付</span><!--<span>银行转帐</span>--></dd>
                        </dl>
                        <!-- <dl class="des-item fix">
                            <dt>配送方式</dt>
                            <dd><span>保税仓包邮</span></dd>
                        </dl>
                        <div id="ProductDetails_divProductBrief">
                            <dl class="des-item fix">
                                <dt>商品简介</dt>
                                <dd class="pro-intr"><span>适用阶段：（12-24个月宝宝) 800g/1罐</span></dd>
                            </dl>
                        </div> -->
                        <dl class="des-item fix">

                        </dl>
                    </div>
                    <div class="product-des last">

                        <dl class="des-item fix">
                            <dt>数量</dt>
                            <dd>
                                <div class="num-wrap fix">
                                    <div class="num-con">
                                        <!--<input type="text" value="1" old-v="1">-->
                                        <span id="ProductDetails_txtbuyAmount" class="Product_input"><input min="1" max="<?php echo $output['goods']['goods_storage']; ?>" class="Product_input" id="buyAmount" type="number" value="1" style="width:30px;" /><input id="oldBuyNumHidden" type="hidden" value="1"  /></span>
                                    </div>

<script >
//    $('.btn-add').click(function() {
//        var max = $('#productDetails_Stock').html();
//        $('#buyAmount')[0].value++;
//        if($('#buyAmount')[0].value > max){
//            $('#buyAmount')[0].value = max;
//            $(this).addClass('disabled');
//            $('.btn-reduce').removeClass('disabled')
//        }
//
//    });

</script>
                                </div>
                                <div class="ovh">

                                    <div style="display:none;">
                                        <input type="hidden" id="hiddenIsLogin" value="nologin" /><span id="buyButton"><img src="/shop/templates/haidao/pictures/mai_buttom_btn.jpg" /></span>
                                    </div><span class="stock"><span class="mr5"><span id="productDetails_Stock" nctype="goods_stock"><?php echo $output['goods']['goods_storage'];?></span></span>件可售&nbsp;<span id="buyCardinalityTip" title="您购买该商品的数量必须为购买基数的整数倍" style="cursor:pointer;color:#ff0000;"></span></span>
                                </div>
                            </dd>
                        </dl>
                        <dl class="des-item fix">
                            <dt></dt>
                            <dd class="pos-rt">
                            	<div class="success-tip" id="success-tip">+1</div>
                                <a id="ProductDetails_nowBuyBtn" nctype="buynow_submit" class="buy-btn buynow">立即购买</a><a href="javascript:void(0);" nctype="addcart_submit" id="addcartButton">加入购物车</a>
                                <div class="gd-code-wrap fix" style="display:none;">
                                	<!-- <div class="fix">
                                        <div class="gd-code-left"><img src="/shop/templates/haidao/pictures/qcode_1572_20160203140337198.jpg" id="ProductDetails_productImg" class="gd-code-img" /></div>
                                        <div class="gd-code-right">
                                            <p>立刻扫码手机购买</p>
                                            <p>立享手机优惠价</p>
                                        </div>
                                    </div> -->
                                </div>

                            </dd>
                        </dl>
                    </div>

                    <div style="display:none;">
                        <div class="imporsourceTypediv">
                            <img id="ProductDetails_imgIcon" class="imporsourceType-img" src="/shop/templates/haidao/pictures/3cca1d5fe4d14e0faa4a0e483e1f8b00.png" style="border-width:0px;" />
                            &nbsp;&nbsp;<span class="litCnArea">荷兰</span>
                        </div>
                        <div>商品编号：<span id="bfdProductCode">1021-HENU004</span></div>
                        <div>售        价：<b>￥<span></span></b></div>

                        <div>市&nbsp;&nbsp;场&nbsp;&nbsp;价：<del>￥<span id="ProductDetails_lblMarkerPrice">0.00</span></del></div>
                        <div style=" display:none;">品牌：<span id="bfdBrand">Nutrilon牛栏</span></div>
                        <div style=" display:none;">商品货号：<span><span id="productDetails_sku">HENU004*2</span><input id="productDetails_sku_v" name="productDetails_sku_v" type="hidden" value="1572_0" /></span></div>
                        <div style=" display:none;">浏览次数：<span>16829 次</span></div>
                        <div style=" display:none;">重量：<span><span id="ProductDetails_litWeight">1600.00 g</span></span></div>
                        <div style=" display:none;">已经出售：<span></span></div>

                    </div>

                </div>
            </div>
        </div>
    </div>
    <div style="height:10px; overflow:hidden;clear:both;"></div>
    <div class="tde-wrap fix">
        <div class="tde-left">
            <div class="pro-wrap">
                <h4>销量排行</h4>
                <div class="pro-list">
                <?php if(is_array($output['hot_sales']) && !empty($output['hot_sales'])){?>
                    <ul>
                        <?php foreach($output['hot_sales'] as $val){?>
                        <li class="fix">
                        	<div class="pro-img">
                        		<a id="ProductDetails_list_Common_GoodsList_HotSale_ctl00_ctl00_ProductDetailsLink1" href="<?php echo urlShop('goods', 'index',array('goods_id'=>$val['goods_id']));?>" target="_blank"><img id="ProductDetails_list_Common_GoodsList_HotSale_ctl00_ctl00_Common_ProductThumbnail1" CustomToolTip="ProductName" src="<?php echo thumb($val, 240);?>" onload="javascript:DrawImage(this,100,100);"  style="border-width:0px;" /></a>
                        	</div>
                        	<div class="pro-info">
                        		<div class="pro-name"><a id="ProductDetails_list_Common_GoodsList_HotSale_ctl00_ctl00_ProductDetailsLink2" href="/product_detail-2105.aspx" target="_blank"><?php echo $val['goods_name']?></a></div>
                        		<div class="pro-price">¥<?php echo $val['goods_promotion_price']?></div>
                        	</div>
                        </li>
                        <?php }?>
                    </ul>
                    <?php }?>
                </div>
            </div>

            <!--         <div class="mt10">
                        <a><img src="/shop/templates/haidao/pictures/rp.jpg" /></a>
                    </div>
                     <div class="mt10">
                        <a><img src="/shop/templates/haidao/pictures/rp2.jpg" /></a>
                    </div> -->

        </div>
        <style>
            ._jmyp #ulProductreview li{
                padding: 0 !important;
            }
            ._jmyp .pagination{
                display: inline-block;
                float: none;
            }
            #comment_tab{display: none;}
        </style>
        <div class="tde-right">
            <div class="product_detail">
                <ul class="product_nav_wrap">
                    <li class="curr"><a>商品详情</a></li>
                    <li><a>商品评价(<?php echo $output['goods']['evaluation_count'];?>)</a></li>
                    <!--<li><a>成交记录</a></li>-->
                    <!--<li><a>商品咨询</a></li>-->
                </ul>

                <div class="product_mc">
                    <div class="pro-desc">
                        <table cellpadding="0" cellspacing="0" class="com-table"><tbody></tbody></table>  <!--海捣网使用新模版-->
                    </div>

                    <div style="overflow:hidden;height:auto">
                        <ul>
                            <!--原属性控件已去掉-->
                        </ul>
                    </div>

                    <?php if (isset($output['plate_top'])) {?>
                    <div class="top-template"><?php echo $output['plate_top']['plate_content']?></div>
                    <?php }?>
                    <?php if (isset($output['plate_bottom'])) {?>
                    <div class="bottom-template"><?php echo $output['plate_bottom']['plate_content']?></div>
                    <?php }?>

                </div>
                <div class="product_mc" style="display:none">
                	<div id="comment-percent" class="comment-percent">
                        <div class="progress progress1">好评度：</div>
                        <div class="progress progress2"><em><?php echo $output['goods_evaluate_info']['good_percent'];?></em>%</div>
                        <div class="progress progress3">
                        	<dl>
                                <dt>
                                    好评<span>(<?php echo $output['goods_evaluate_info']['good_percent'];?>%)</span>
                                </dt>
                                <dd>
                                    <div id="ProductDetails_divNiceDegree" style="width:<?php echo $output['goods_evaluate_info']['good_percent'];?>%"></div>
                                </dd>
                            </dl>
                            <dl>
                                <dt>
                                    中评<span>(<?php echo $output['goods_evaluate_info']['normal_percent'];?>%)</span>
                                </dt>
                                <dd>
                                    <div id="ProductDetails_divMidDegree" style="width:<?php echo $output['goods_evaluate_info']['normal_percent'];?>%"></div>
                                </dd>
                            </dl>
                            <dl>
                                <dt>
                                    差评<span>(<?php echo $output['goods_evaluate_info']['bad_percent'];?>%)</span>
                                </dt>
                                <dd>
                                    <div id="ProductDetails_divPoorDegree" style="width:<?php echo $output['goods_evaluate_info']['bad_percent'];?>%"></div>
                                </dd>
                            </dl>
                        </div>
                    </div>
                    <ul id="all-comments-title">
                        <li class="cur"><a href="javascript:;">全部评价<span>(<?php echo $output['goods_evaluate_info']['all'];?>)</span></a></li>
                        <li><a href="javascript:;">好评<span>(<?php echo $output['goods_evaluate_info']['good'];?>)</span></a></li>
                        <li><a href="javascript:;">中评<span>(<?php echo $output['goods_evaluate_info']['normal'];?>)</span></a></li>
                        <li><a href="javascript:;">差评<span>(<?php echo $output['goods_evaluate_info']['bad'];?>)</span></a></li>
                    </ul>
                    <ul id="ulProductreview">
                    	<!-- <h2>
                            <span class="comment-span1">评价心得</span>
                            <span class="comment-span2">顾客满意度</span>
                            <span class="comment-span3">购买信息</span>
                            <span class="comment-span4">评论者</span>
                        </h2> -->
                        <!-- 商品评价内容部分 -->
                        <div id="goodseval" class="ncs-commend-main"></div>
</ul>
                    <div class="details_plzx">
                        <!-- <span class="colorF"><a id="ProductDetails_hpkProductReviews" class="Product_b" href="LookProductReviews.aspx?productId=1572">查看全部52条评论</a></span> -->
                        <a class="Product_a" href="/login.aspx?ReturnUrl=/product_detail-1572.aspx" style="display:none;">请先登录</a>
                    </div>
                </div>

                <div class="product_mc" style="display:none">

<table class="tab_sales">
<tr class="tr_head">
<td>买家</td><td>数量</td><td>付款时间</td><td>款式和型号</td>
</tr>

<tr>
<td>W**2</td>
<td>1</td>
<td>2016/2/4 22:39:12</td>
<td>&nbsp;</td>
</tr>

<tr>
<td>W**0</td>
<td>1</td>
<td>2016/2/3 9:11:21</td>
<td>&nbsp;</td>
</tr>

<tr>
<td>1**9</td>
<td>1</td>
<td>2016/2/2 9:48:10</td>
<td>&nbsp;</td>
</tr>

<tr>
<td>Q**3</td>
<td>1</td>
<td>2016/2/2 9:27:47</td>
<td>&nbsp;</td>
</tr>

<tr>
<td>W**8</td>
<td>1</td>
<td>2016/2/1 14:33:21</td>
<td>&nbsp;</td>
</tr>

<tr>
<td>2**1</td>
<td>1</td>
<td>2016/2/1 2:13:10</td>
<td>&nbsp;</td>
</tr>

</table>
                    <div class="details_plzx">
                        <span class="colorF"><a id="ProductDetails_hpkProductSales" class="Product_b" href="LookLineItems.aspx?productId=1572">查看全部6498条成交记录</a></span>
                    </div>
                </div>

                <div class="product_mc" style="display:none">
                    <!--商品咨询-->

                    <div class="details_plzx">
                        <span class="colorF"><a id="ProductDetails_hpkProductConsultations" class="Product_b" href="ProductConsultationsAndReplay.aspx?productId=1572">查看全部0条咨询</a></span>
                        <a class="Product_a" href="/ProductConsultations.aspx?ProductId=1572">我要咨询</a>
                    </div>
                </div>

            </div>
            <script type="text/javascript">
                var number = $("#buyAmount");
                var theme = "disabled";
                $(function () {
					//没有库存 时  给 图片 添加 枯竭 印记
                    var stNum = $("#productDetails_Stock").text();
					if(isNaN(stNum)){
						stNum = 0;
					}else{
						stNum = parseInt(stNum);
					}
					if (stNum == 0)
					{
					    number.attr(theme, theme);
					    number.val(0);

					} else {
					    number.removeAttr(theme);
					}
					if(!stNum){
						$("<div class='emp'></div>").appendTo(".zoom-small-image");
					}
                    var imgsrc = $("#ProductDetails_productImg").attr("src");
                    if (imgsrc == undefined || imgsrc == "" || imgsrc == null) {
                        $(".gd-code-wrap").css("display", "none");
                    } else {
                        if (Number($("#productDetails_Stock").text()) == 0) {
                        } else {
                            $(".gd-code-wrap").css("display", "");
                        }
                    }

                    if (number.val() >= parseInt($("#productDetails_Stock").text())) {
                        $('div[name="spAdd"]').addClass(theme);
                    }
                    $('div[name="spAdd"]').bind("click", function () {
                        if ($(this).hasClass(theme)) {
                            return;
                        }
                        var stock = parseInt($("#productDetails_Stock").text());
                        var val = number.val();
                        if (isNaN(val) || val == "") {
                            val = 1;
                        }
                        var num = parseInt(val) + 1;
                        var $btnSub = $('div[name="spSub"]');
                        if (num <= stock) {
                            number.val(num).attr("old-v", num);
                            ChangebuyAmount();
                            if (num > 1) {
                                $btnSub.removeClass(theme);
                            }
                            if (num == stock) {
                                $(this).addClass(theme);
                            }
                        }
                    });
                    $('div[name="spSub"]').bind("click", function () {
                        if ($(this).hasClass(theme)) {
                            return;
                        }
                        var stock = parseInt($("#productDetails_Stock").text());
                        var $btnAdd = $('div[name="spAdd"]');
                        var val = number.val();
                        if (isNaN(val) || val == "") {
                            val = 1;
                        }
                        var num = parseInt(val) - 1;
                        if (num >= 1) {
                            number.val(num).attr("old-v", num);
                            ChangebuyAmount();
                            if (num == 1) {
                                $(this).addClass(theme);
                            }
                            if (num < stock) {
                                $btnAdd.removeClass(theme);
                            }
                        }
                    });

                    $(".product_nav_wrap li").click(function () {
                        var li_index = $(".product_nav_wrap li").index(this);
                        $(".product_mc").hide().eq(li_index).show();
                        $(this).addClass("curr").siblings().removeClass("curr");
                    });
                });
            </script>
            <!-- <script src="/shop/templates/haidao/js/product.helper.js" type="text/javascript"></script> -->
            <div class="clearboth"></div>
            <!-- 相关商品-->
        </div>
    </div>
<?php }?>

</div>

<script>
    function addcart_callback(data){
            $('#bold_num').html(data.num);
            $('#bold_mly').html(price_format(data.amount));
            $('.ncs-cart-popup').fadeIn('fast');
            update_cart_num();
        }

    $(function(){
        // 加入购物车
        $('a[nctype="addcart_submit"]').click(function(){
            addcart(<?php echo $output['goods']['goods_id'];?>, checkQuantity(),'addcart_callback');
        });
        // 立即购买
        $('a[nctype="buynow_submit"]').click(function(){
            buynow(<?php echo $output['goods']['goods_id']?>,checkQuantity());
        });
        // 验证购买数量
        function checkQuantity(){
            var quantity = parseInt($("#buyAmount").val());
            if (quantity < 1) {
                alert("<?php echo $lang['goods_index_pleaseaddnum'];?>");
                $("#buyAmount").val('1');
                return false;
            }
            max = parseInt($('[nctype="goods_stock"]').text());
            <?php if ($output['goods']['is_virtual'] == 1 && $output['goods']['virtual_limit'] > 0) {?>
            max = <?php echo $output['goods']['virtual_limit'];?>;
            if(quantity > max){
                alert('最多限购'+max+'件');
                return false;
            }
            <?php } ?>
            <?php if (!empty($output['goods']['upper_limit'])) {?>
            max = <?php echo $output['goods']['upper_limit'];?>;
            if(quantity > max){
                alert('最多限购'+max+'件');
                return false;
            }
            <?php } ?>
            if(quantity > max){
                alert("<?php echo $lang['goods_index_add_too_much'];?>");
                return false;
            }
            return quantity;
        }
        // 立即购买js
        // function buynow(goods_id,quantity){
        //     <?php if ($_SESSION['is_login'] !== '1'){?>
        //         login_dialog();
        //     <?php }else{?>
        //         if (!quantity) {
        //             return;
        //         }
        //         <?php if ($_SESSION['store_id'] == $output['goods']['store_id']) { ?>
        //         alert('不能购买自己店铺的商品');return;
        //         <?php } ?>
        //         $("#cart_id").val(goods_id+'|'+quantity);
        //         $("#buynow_form").submit();
        //     <?php }?>
        // }
        /* 加入购物车后的效果函数 */

    })


    $(function(){
        //评价列表
        $('#all-comments-title').on('click', 'li', function() {
            $('#all-comments-title li').removeClass('cur');
            $(this).addClass('cur');
            load_goodseval($(this).attr('data-type'));
        });
        load_goodseval('all');
        function load_goodseval(type) {
            var url = '<?php echo urlShop('goods', 'comments', array('goods_id' => $output['goods']['goods_id']));?>';
            url += '&type=' + type;
            $("#goodseval").load(url, function(){
                $(this).find('[nctype="mcard"]').membershipCard({type:'shop'});
            });
        }

        // $('.side_nav').hover(function(){
        //     $('.my_left_category').show();
        // },function(){
        //     $('.my_left_category').hide();
        // })
    })

    var lock = false;
    $('#categorymenu a').click(function(){

        return true;
//        var href = this.getAttribute('href');
//
//        lock = true;
//        $('body').scrollTop($(href).offset().top - 200)
//        lock = false;
//
//        return false;
    });

//    $('.ncs-intro,.nc').css({
//        'min-height' : $(window).height()
//    })

    var selectors = ['#ncGoodsIntro','#ncGoodsDetails','#ncGoodsTraded','#ncGoodsRate'];

    $(window).bind('hashchange',function() {
        var hash = window.location.hash;
        $('#categorymenu a[href="' + location.hash + '"]').closest('li').addClass('current').siblings().removeClass('current');
    });

    window.onscroll = function(){
        return;
        if(lock){
            return;
        }
        var top = $('body').scrollTop();
        var i = selectors.length;
//        if(top > $('#ncGoodsRate').offset().top - 300){
//            $("a[href=#ncGoodsRate" + ']').parent().addClass('current').siblings().removeClass('current');
//            return;
//        }
        while(i--){
            if(top > $(selectors[i]).offset().top){
                console.log(selectors[i]);
                $("a[href=" + selectors[i] + ']').parent().addClass('current').siblings().removeClass('current');
                break;
            }
        }
//        console.log($('body').scrollTop())
    }
</script>
<!--
<style type="text/css">
    .mg-top10{margin-top:10px;}
    .bg-fff{background-color: #FFF;}
</style>
<div class="_main mg-top10 bg-fff">
aaasdf
    <div class="linkgoodswrap">
        <h2>
            你可能会喜欢
        </h2>
        <ul>
            <li>
                <a href="#">
                    <img src="">
                </a>
            </li>
        </ul>
    </div>
</div>
 -->


<?php }?>